docs(rpc): add HTTP API endpoint reference#476
Conversation
Document the RPC crate's HTTP surface in a single canonical page so the endpoint details live with the code rather than drifting inside CLAUDE.md. Covers the API server (health, finalized state/block, justified checkpoint, blocks by root/slot, fork-choice tree + D3.js UI, runtime aggregator toggle), the metrics/debug server, and the Hive test-driver endpoints, with request/response shapes, status codes, and content types. Link the page from the mdBook TOC and replace the now-redundant (and partially stale) endpoint list in CLAUDE.md with a pointer to it.
🤖 Kimi Code ReviewDocumentation Structure: Good move extracting the HTTP API reference into a dedicated Technical Accuracy Concerns:
Consistency Check:
Minor:
Overall: The documentation is well-structured with clear tables and examples. Just verify the concurrency model description matches the actual Automated review by Kimi (Moonshot AI) · kimi-k2.5 · custom prompt |
🤖 Codex Code Review
No other correctness, security, performance, or consensus-layer findings from this PR. The diff is docs-only, and it does not touch fork choice, attestation validation, STF, XMSS verification, or SSZ code paths. I did not run tests. Automated review by OpenAI Codex · gpt-5.4 · custom prompt |
Greptile SummaryThis PR adds a canonical HTTP API reference for the RPC crate. The main changes are:
Confidence Score: 5/5This looks safe to merge.
|
| Filename | Overview |
|---|---|
| docs/rpc.md | Adds the HTTP API reference with endpoint paths, methods, response shapes, status codes, content types, ports, admin controls, metrics/debug routes, and Hive test-driver notes. |
| docs/SUMMARY.md | Adds the HTTP API page to the mdBook navigation using the existing relative-link style. |
| CLAUDE.md | Replaces the duplicated HTTP endpoint list with a pointer to the new canonical docs page. |
Reviews (1): Last reviewed commit: "docs(rpc): add HTTP API endpoint referen..." | Re-trigger Greptile
🤖 Claude Code ReviewNow I have everything I need to write the review. Review:
|
What
Adds
docs/rpc.md, a single reference page for the RPC crate's HTTP surface, and links it from the mdBook TOC. Trims the duplicated (and partially stale) endpoint list inCLAUDE.mddown to a pointer at the canonical doc.Contents
The page documents every endpoint with method, path, response format, status codes, error bodies, and content types:
:5052) — health, finalized state (SSZ), finalized block (SSZ), justified checkpoint, blocks by root/slot + header, fork-choice tree (JSON) + D3.js UI, runtime aggregator toggle (GET/POST).:5054) — Prometheus/metrics,/health, jemalloc heap profiling (/debug/pprof/allocs+ flamegraph).HIVE_LEAN_TEST_DRIVER, the fourPOST /lean/v0/test_driver/...routes plus the health stub.Why
Endpoint details were only in
CLAUDE.md, where they had already drifted from the code (missing/lean/v0/blocks/finalizedand the metrics-server/health). Keeping the reference indocs/puts it next to the spec/ops docs and gives a single source of truth.Verification
Documentation was fact-checked endpoint-by-endpoint against the source in
crates/net/rpc(routes, handlers, content-type constants, status-code branches, and serde shapes forCheckpoint/H256/ForkChoiceResponse). The compact/healthbody and the/blocks/finalized404 edge case are reflected accurately.